<?php

namespace addons\previewfile\controller;

use think\addons\Controller;
use think\Config;
use think\Hook;


class Index extends Controller
{


    public function index()
    {
        $url = $this->request->param('url');
        $parse_info = parse_url($url);
        $ext_info = substr(strrchr($parse_info['path'],"."),1);

        $this->view->assign('ext_info',$ext_info);
        $this->view->assign('url',$url);
        return $this->view->fetch();
    }


}
